//
//  RedemptionViewController.m
//  TenThousand
//
//  Created by 我的 on 16/7/18.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "RedemptionViewController.h"
#import "EarlyRedemptionViewController.h"

@interface RedemptionViewController ()<UIAlertViewDelegate>
@property (weak, nonatomic) IBOutlet UILabel *Rate;//年利率
@property (weak, nonatomic) IBOutlet UILabel *Dedit;//投资金额
@property (weak, nonatomic) IBOutlet UILabel *profit;//预计收益
@property (weak, nonatomic) IBOutlet UILabel *Term;//期限

@end

@implementation RedemptionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createLeft:[UIImage imageNamed:@"ZHSZicon_03"] leftClick:^{
        [self.navigationController popViewControllerAnimated:YES];
    } right:nil rightClick:nil];
    self.navigationItem.title = @"我要投资";
    
    NSLog(@"%@",self.model.BorrowListid);
}

//点击提前赎回
- (IBAction)redemption:(id)sender {
    
    
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"确认提前赎回" delegate: nil cancelButtonTitle:@"确定" otherButtonTitles: nil, nil];
    alert.delegate = self;
    [alert show];
   
}


//跳转
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
    EarlyRedemptionViewController *earlyView = [[EarlyRedemptionViewController alloc] init];
    [self setHidesBottomBarWhenPushed:YES];
    earlyView.BorrowListId = self.model.BorrowListid;
    [self.navigationController pushViewController:earlyView animated:YES];
    
}


@end
